import request from '@/utils/request'
// 获取房间列表
export function getRoomList(data) {
  return request({
    url: '/capsule/room/page',
    method: 'post',
    data: data
  })
}
// 获取详情
export function getRoomDetail(id) {
  return request({
    url: '/capsule/room/getDetail/' + id,
    method: 'get'
  })
}
// 新增和修改
export function roomAdd(data) {
  return request({
    url: '/capsule/room/modify',
    method: 'post',
    data: data
  })
}
// 删除
export function deleteRoom(id) {
  return request({
    url: '/capsule/room/delete/' + id,
    method: 'get'
  })
}
// 改价
export function RoomPrice(data) {
  return request({
    url: '/capsule/room/changePrice',
    method: 'post',
    data: data
  })
}
// 获取规格
export function roomType(id) {
  return request({
    url: '/capsule/pay/order/capsuleSpecsSelects/' + id,
    method: 'get'
  })
}
// 还原价格
export function revertPrice(id) {
  return request({
    url: '/capsule/room/revertPrice/' + id,
    method: 'get'
  })
}
// 开关电
export function onPower(data) {
  return request({
    url: '/capsule/room/powerOnOrOff',
    method: 'post',
    data: data
  })
}
// 远程开锁
export function remoteLock(id) {
  return request({
    url: '/capsule/room/gatewayUnlockTByAdmin/' + id,
    method: 'get'
  })
}
// 密码开锁
export function passwordLock(id) {
  return request({
    url: '/capsule/room/unlockTByAdmin/' + id,
    method: 'get'
  })
}
// 二维码
export function qrcode(data) {
  return request({
    url: 'capsule/room/qrcode',
    method: 'post',
    data: data
  })
}


